<form class="form  form-horizontal" role="form" action="insert" method="post">
    <input type="hidden" value="1" />
    <div class="col-lg-12">

        <div class="form-group">
            <label>题目名称:</label>
            <input class="form-control" type="text" name="title" value="">
        </div>
        <div class="form-group">
            <label>题目答案:</label>
            <div class="answer-warp">
                <div class="answer-input" id="answer">
                    <div class="input-group">
                        <span class="input-group-addon">
                            <input type="checkbox" name="flag" value="A">
                        </span>
                        <span class="input-group-addon" id="sort">A</span>
                        <input type="text" class="form-control" name="answer">
                    </div><!-- /input-group -->
                </div>
            </div>
            <div class="margin-top-10" style="margin-top:10px;">
                <a href="javascript:;" id="add" class="btn btn-primary"><span class="fa fa-plus"></span></a>
            </div>

        </div>
    </div>
</form>
<script type="text/javascript">
 var chars = ['B','C','D','E'];
 var num = 0;
 var answer = $("#answer");
 var input = answer.children().clone();
 $("#add").on('click',function(){
     temp = input.clone();
     if(num < chars.length){
         console.log(num);
         temp.find("#sort").text(chars[num]);
         num++;
         answer.append(temp);

     }else{
         
         return;
     }
 });
</script>
